#!/usr/bin/env node
const http=require('http');
http.createServer((req,res)=>{
    if(req.url='/'){
    let buf=Buffer.from('<html><body><h1>hello 郭雨欣</h1></body></html>');
    res.setHeader('Content-Type','text/html;charset=utf-8');
    res.setHeader('Content-length',`${buf.buteLength}`)
    res.end(buf.toString('utf8'))
    }
    
else{res.statusCode=404;
     res.setHeader('Content-Type','text/plain');
res.end('Resourse not found!')
    }}).listen(3000)
